<div class="child" {% if cf.instance.id %}id="child{{ cf.instance.id }}"{% endif %}>
    <fieldset class="block form">
    {% if not cf.instance.id %}
        <legend>Nouveau Ticket fils</legend>
        <span>
    {% else %}
    <legend><img src="{{ MEDIA_URL }}images/{% if cf.instance.state_id == 4 %}plus.png{% else %}minus.png{% endif %}" alt="plus" onClick="togglePlusMinus(this, 'child{{ cf.instance.id }}_content');" />
        {% if cf.instance.state.img %}<img src="{{ cf.instance.state.img.url }}" alt="{{ cf.instance.state }}" />{% else %}[ {{ cf.instance.state }} ]{% endif %}
        &nbsp;{{ cf.instance.title }}
    </legend>
        <span id="child{{ cf.instance.id }}_content" style="display: {% if cf.instance.state_id == settings.TICKET_STATE_CLOSED %}none{% else %}inline{% endif %}">
        {{ cf.id }}
        <span><strong>Assigné à :</strong> {{ cf.instance.assigned_to }}</span>
        <hr />
    {% endif %}
            <table>
                <tr>
                    <th class="large">{{ cf.title.label_tag }}</th>
                    <td {% if cf.instance.id %}ticket_id="{{ cf.instance.id }}"{% endif %} class="large right">{{ cf.title }}</td>
                    <td class="large right">{{ cf.title.errors }}</td>
                </tr>
                <tr>
                    <th></th>
                    <td {% if cf.instance.id %}ticket_id="{{ cf.instance.id }}"{% endif %} class="right">{{ cf.text }}</td>
                    <td class="right">{{ cf.text.errors }}</td>
                </tr>
            </table>
        </span>
    </fieldset>
</div>
